package in.cdacnoida.persistance;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;

import in.cdacnoida.contacts.entities.Address;

public class InMemoryAddressRepo implements IAddressRepo{

	HashMap<Long,Address> addressMap = new HashMap<Long, Address>();
	
	@Override
	public void createAddress(Address a) {
		addressMap.put(a.getId(), a);
		
	}

	@Override
	public Address getAddress(Long id) {
		return addressMap.get(id);
		
	}

	@Override
	public List<Address> getAddressList() {
//			return addressMap.values().toArray();
		return null;
		
	}

	@Override
	public void updateAddress(Address oldAddr, Address newAddr) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteAddress(Long id) {
		// TODO Auto-generated method stub
		
	}

}
